﻿<UserControl x:Class="SilverlightWebcamEncoder.Views.MediaUploadView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             mc:Ignorable="d"
             d:DesignHeight="300"
             d:DesignWidth="400" TextOptions.TextHintingMode="Animated">
    <UserControl.Resources>
        <Style x:Key="VideoServiceSelectButtonStyle"
               TargetType="Button">
            <Setter Property="Background"
                    Value="#FF1F3B53" />
            <Setter Property="Foreground"
                    Value="#FF000000" />
            <Setter Property="Padding"
                    Value="3" />
            <Setter Property="BorderThickness"
                    Value="1" />
            <Setter Property="BorderBrush">
                <Setter.Value>
                    <LinearGradientBrush EndPoint="0.5,1"
                                         StartPoint="0.5,0">
                        <GradientStop Color="#FFA3AEB9"
                                      Offset="0" />
                        <GradientStop Color="#FF8399A9"
                                      Offset="0.375" />
                        <GradientStop Color="#FF718597"
                                      Offset="0.375" />
                        <GradientStop Color="#FF617584"
                                      Offset="1" />
                    </LinearGradientBrush>
                </Setter.Value>
            </Setter>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Button">
                        <Grid>
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualState x:Name="Normal" />
                                    <VisualState x:Name="MouseOver" />
                                    <VisualState x:Name="Pressed">
                                        <Storyboard>
                                            <DoubleAnimation Duration="0"
                                                             To="1"
                                                             Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)"
                                                             Storyboard.TargetName="contentPresenter"
                                                             d:IsOptimized="True" />
                                            <DoubleAnimation Duration="0"
                                                             To="1"
                                                             Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)"
                                                             Storyboard.TargetName="contentPresenter"
                                                             d:IsOptimized="True" />
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Disabled">
                                        <Storyboard>
                                            <DoubleAnimation Duration="0"
                                                             To="0.4"
                                                             Storyboard.TargetProperty="(UIElement.Opacity)"
                                                             Storyboard.TargetName="contentPresenter"
                                                             d:IsOptimized="True" />
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="FocusStates">
                                    <VisualState x:Name="Focused" />
                                    <VisualState x:Name="Unfocused" />
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <Border x:Name="Background"
                                    BorderBrush="{TemplateBinding BorderBrush}"
                                    BorderThickness="{TemplateBinding BorderThickness}"
                                    CornerRadius="3">
                                <Grid Background="{TemplateBinding Background}"
                                      Margin="1" />
                            </Border>
                            <ContentPresenter x:Name="contentPresenter"
                                              ContentTemplate="{TemplateBinding ContentTemplate}"
                                              Content="{TemplateBinding Content}"
                                              HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                              Margin="{TemplateBinding Padding}"
                                              VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                              RenderTransformOrigin="0.5,0.5">
                                <ContentPresenter.RenderTransform>
                                    <CompositeTransform />
                                </ContentPresenter.RenderTransform>
                            </ContentPresenter>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </UserControl.Resources>
    <Grid x:Name="LayoutRoot">
        <StackPanel Orientation="Horizontal"
                    VerticalAlignment="Top"
                    HorizontalAlignment="Left">
        	<StackPanel.Effect>
        		<DropShadowEffect ShadowDepth="0" BlurRadius="14" Opacity="0.3"/>
        	</StackPanel.Effect>
            <Button HorizontalAlignment="Center"
                    VerticalAlignment="Center"
                    Width="45"
                    Height="45"
                    Background="{x:Null}"
                    BorderBrush="{x:Null}"
                    Foreground="{x:Null}"
                    Style="{StaticResource VideoServiceSelectButtonStyle}" x:Name="youtubeSelectButton" Click="youtubeSelectButton_Click" ToolTipService.ToolTip="upload to youtube" FontFamily="Segoe UI">
            	<Image Source="/SilverlightWebcamEncoder;Component/Resources/youtube-icon.png"
            		Stretch="Fill" />
            </Button>
            <Button Style="{StaticResource VideoServiceSelectButtonStyle}"
                    Background="{x:Null}"
                    Foreground="{x:Null}"
                    BorderBrush="{x:Null}"
                    Width="45"
                    Height="45" x:Name="facebookSelectButton" Click="facebookSelectButton_Click" Visibility="Collapsed">
                <Image Source="/SilverlightWebcamEncoder;Component/Resources/facebook-icon.png"
                       Stretch="Fill" />
            </Button>
        </StackPanel>
    </Grid>
</UserControl>
